import React, { Component } from 'react';

class ListView extends Component {

    listItems = [];

    constructor(props) {
        super(props);
        const numbers = [10, 20, 30, 40, 50];
        this.listItems = numbers.map((number, index) =>
            <li key={index}>{`value:${number} index:${index}`}</li>
        );
        console.log('listItems:', this.listItems);
    }

    componentDidMount() {

    }

    render() {
        return (
            <ul>{this.listItems}</ul>
        );
    }
}

export default ListView;